package com.thz.websqlit.contact.entity;

import java.io.Serializable;
import java.util.Objects;

public class ChartInfoEntity implements Serializable {
    private String userUuid;
    private String contactUuid;
    private String chatContent;
    /**
     * 聊天方向：0 本端 1对端
     */
    private Integer contactState = 1;

    public ChartInfoEntity(){

    }
    public ChartInfoEntity(String userUuid,String contactUuid){
        this.userUuid = userUuid;
        this.contactUuid = contactUuid;
    }
    public ChartInfoEntity(String userUuid,String contactUuid,String chatContent){
        this.userUuid = userUuid;
        this.contactUuid = contactUuid;
        this.chatContent = chatContent;
    }
    public String getUserUuid() {
        return userUuid;
    }

    public void setUserUuid(String userUuid) {
        this.userUuid = userUuid;
    }

    public String getContactUuid() {
        return contactUuid;
    }

    public void setContactUuid(String contactUuid) {
        this.contactUuid = contactUuid;
    }

    public String getChatContent() {
        return chatContent;
    }

    public void setChatContent(String chatContent) {
        this.chatContent = chatContent;
    }

    public Integer getContactState() {
        return contactState;
    }

    public void setContactState(Integer contactState) {
        this.contactState = contactState;
    }

    @Override
    public String toString() {
        return "ChartInfoEntity{" +
                "userUuid='" + userUuid + '\'' +
                ", contactUuid='" + contactUuid + '\'' +
                ", chatContent='" + chatContent + '\'' +
                ", contactState=" + contactState +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ChartInfoEntity that = (ChartInfoEntity) o;
        return Objects.equals(userUuid, that.userUuid) &&
                Objects.equals(contactUuid, that.contactUuid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userUuid, contactUuid);
    }
}
